#pragma once
#include <vector>
#include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <nice2d/serializer.h>
#include <nice2d/metaobject.h>

class ImageDescriptor : public Serializer
{
    DECLARE_OBJECT(ImageDescriptor)
public:
    bool load(const std::string filename);

    PTree serialize() override;
    void deserialize(const PTree &node) override;

    std::string file;
    sf::Vector2i imageSize;
    std::vector<sf::IntRect> areas;
};
